package com.lowrisk.springcloud.controller;

import com.lowrisk.springcloud.ServiceInfoUtil;
import com.lowrisk.springcloud.entity.Order;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author jiadianduo
 * @Description:
 * @Date:Created in 2019/3/24 10:20
 */
@RestController
public class OrderController {


    @GetMapping("/order/{id}")
    public String findOrderById(@PathVariable String id){
        Order order = new Order();
        order.setId("123");
        order.setPrice(12.4);
        order.setReceiverName("jiadianduo");
        order.setReceiverAddress("beijing");
        order.setReceiverPhone("12345555");
        return order.toString() + "\n port="+ ServiceInfoUtil.getPort();
    }

}
